View Issue Details

IDProjectCategoryView StatusLast Update
0001343K18X001.00 SKB SWANSWpublic2021-10-01 09:48
Reporter(ALTech) Sangmin Choi Assigned To(ALTech) Sangmin Choi Due Date2021-09-10 09:55
PriorityurgentSeveritys2-severeReproducibilitysometimes
Status closedResolutionfixed 
Summary0001343: There is no audio when I wake up the STB after set audio output as "External Device".
DescriptionSometimes, there is no audio when I wake up the STB after set audio output to "External Device".
You can easily reproduce this issue after change the audio output to "External Device".
Steps To Reproduce[Precondition]
Change the default option as "실시간TV" refer to the attached document(First Screen setting.pdf)
Change the audio output to "External Device" refer to the attached document(Audio output setting.pdf)

[Steps to reproduce]
1. Turn on the STB and check you can hear the audio with TV's speaker.
2. Press the power button and then the STB will go sleep mode.
3. Press the power button and then the STB will wake up and check you can hear the audio.
Repeat 2,3 steps and you can't hear the audio soon.
TagsNo tags attached.
Attach Tags

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

(ALTech) Sangmin Choi

2021-09-07 09:15

developer  

First Screen setting.pdf (2,648,646 bytes)
Audio output setting.pdf (2,375,780 bytes)

(ALTech) Sangmin Choi

2021-09-07 09:40

developer   ~0008087

Last edited: 2021-09-07 09:41

One more thing, when I repeat the Standby On/Off, I can't hear the audio.
And, the video was stopped after few seconds.
I attached the logcat for this issue.(BFX-UA300_20210903-153900.zip)

I can see the weird log message like followings.
09-03 15:50:44.545 391 7668 D halMediaPlayer TS buffer overflow, [391][-170844224] pipeline blocked
09-03 15:50:44.575 391 7668 D BOXKEY-STDVB [DEVICE 0] ++ AVP_InjectTS feed delay gap(30) > 10ms, written : 0, total_lengthData: 203792
09-03 15:50:44.575 391 7668 D BOXKEY-STDVB [DEVICE 0] ++ feed delay gap(30182) > BUFFERING_DURATION(20000)
09-03 15:50:44.575 391 7668 D halMediaPlayer TS buffer overflow, [391][-170844224] pipeline blocked
09-03 15:50:44.605 391 7668 D BOXKEY-STDVB [DEVICE 0] ++ AVP_InjectTS feed delay gap(30) > 10ms, written : 0, total_lengthData: 255116
09-03 15:50:44.605 391 7668 D BOXKEY-STDVB [DEVICE 0] ++ feed delay gap(30151) > BUFFERING_DURATION(20000)

Please check this log file also.

Thank you.

(ALTech) Sangmin Choi

2021-09-07 09:40

developer   ~0008088

So, there are two problems.

1. Sometimes, there is no audio when I wake up the STB after set audio output to "External Device".
2. Sometimes, there is no audio and video is stopped soon when I wake up the STB after set audio output to "External Device".

(ALTech) Sangmin Choi

2021-09-07 09:41

developer  

(SW) River Wong

2021-09-07 10:13

developer   ~0008091

Last edited: 2021-09-07 10:14

Hi Sangmin,

1.Which version do you use to reproduce this issue? I will like to use same version to reproduce it.
2.About how many times to sleep/wakeup you can see this issue? Just give an approximate value is enough.
3.When issue happens, do you play IPTV or Youtube to check the audio? If you play IPTV, could you check Youtube? Because from your log in 0001343:0008087, it seems there is some error in IPTV player.

(ALTech) Sangmin Choi

2021-09-07 10:25

developer   ~0008092

Last edited: 2021-09-07 10:28

Hi, River,

1.Which version do you use to reproduce this issue? I will like to use same version to reproduce it.
-> I found this issue on 19.531.16 first, and I can see this issue on the latest version(20210906).
2.About how many times to sleep/wakeup you can see this issue? Just give an approximate value is enough.
-> About 3~5 times.
3.When issue happens, do you play IPTV or Youtube to check the audio? If you play IPTV, could you check Youtube? Because from your log in 0001343:0008087, it seems there is some error in IPTV player.
-> IPTV. I didn't test with Youtube. Because when I change channel or enter Home menu then I can hear the audio.

(SW) River Wong

2021-09-07 10:37

developer   ~0008093

Last edited: 2021-09-07 10:38

Hi Sangmin,

Form "-> IPTV. I didn't test with Youtube. Because when I change channel or enter Home menu then I can hear the audio."
I think this issue is related to IPTV Player. If it is a system level issue, you should not hear any audio when you change channel or enter Home menu.
I think you should report this issue to who in charge of IPTV player.

I test 9/6 version and play youtube to check audio, I test 10 times and can not reproduce this issue.

(ALTech) Sangmin Choi

2021-09-07 12:05

developer   ~0008094

Hi, River,

Did you change the audio output to "External Device"?
And, please using the front power button or RCU "B tv 전원" key to wake up or sleep the STB.

(SW) River Wong

2021-09-07 14:22

developer   ~0008095

Hi Sangmin,

Did you change the audio output to "External Device"?
>>> Yes, I change to "External Device" and can hear audio from TV.
And, please using the front power button or RCU "B tv 전원" key to wake up or sleep the STB.
>>> Yes, I use this key to do sleep/wakeup.

I only reproduce two times with IPTV and it is hard to reproduce in my environment. Can I know how long do you let SWAN in standby and then wakeup it?

I check your log, I found some error about "AMP_SNDSINK_SetupPort2: AMP function call return an error".
Could you use the following command to check if this message appears when every time you reproduce this issue :
logcat | grep "AMP_SNDSINK_SetupPort2: AMP function call return an error"

(ALTech) Sangmin Choi

2021-09-07 14:53

developer   ~0008096

Hi, River,

Just put the STB as standby few seconds, for example, 5~10 seconds.
And when I reproduce this issue, there is no log message which you request.

BFX-UA300:/ $ logcat | grep "AMP_SNDSINK_SetupPort2: AMP function call return an error"

BFX-UA300:/ # logcat | grep 'AMP_SNDSINK_SetupPort2'

(SW) River Wong

2021-09-07 18:47

developer   ~0008103

Last edited: 2021-09-07 18:48

Hi Sangmin,

I use a record stream of channel 73 that Wooshin gave to me before for NUGU noise issue. And use ffmpeg tool to stream the IPTV content locally.
But with channel 73 content, it seems not easy to reproduce this issue. I have to try maybe 30~50 times then I can see one time of this problem.
Could you record the channel that you are easy to see this issue and share to me? Then it can shorten the debug and verify time.

(ALTech) Sangmin Choi

2021-09-07 19:19

developer   ~0008105

Hi, River,

I think this issue is not related with channel.
And, it's easy to reproduce on my side. Is it related with network bandwidth maybe?

If you want to test on my side with any debug library or firmware, please let me know.

(SW) River Wong

2021-09-08 11:03

developer   ~0008111

Hi Sangmin,

I create a Synpatics Jira: https://synaextjira.atlassian.net/jira/software/c/projects/SKBSBALT/issues/SKBSBALT-168 to report this issue to Synpatics.

 Is it related with network bandwidth maybe?
>>> I do not think so, because in my environment, my streaming server is connect to the same router as SWAN.

If you want to test on my side with any debug library or firmware, please let me know.
>>> Thanks, I will do more test. And will let you know if I need your help.

(SW) River Wong

2021-09-16 13:38

developer   ~0008236

Hi Sangmin,

Could you show the reproduce steps to Synpatics Kail? He is trying to reproduce and debug this issue.

(ALTech) Sangmin Choi

2021-09-16 14:17

developer   ~0008238

Hi, River,

Kail can reproduce this issue.

Thank you.

(ALTech) Wooshin Kang

2021-09-28 10:13

developer   ~0008312

Hi River,

Do you have any update..?

(SW) River Wong

2021-09-28 13:56

developer   ~0008317

Hi Wooshin,

We are discussing this issue with Synaptics in Synaptics JIra168. Synatpics R&D are helping debug this issue.
I think it is an race condition issue of using synaptics ampsdk APIs with Audio HAL and IPTV. It needs Synaptics to fix it.

(SW) River Wong

2021-09-28 18:48

developer   ~0008320

Hi Sangmin,

I built a test image as Synaptics engineer Fan suggested to retry API several times when IPTV player fails to call AMPSDK API.
I tested it 100 times in my environment (streaming IPTV with ffmpeg) and think it is OK.
Please help to verify and test this test image and to check if this issue is fixed or not.
Thanks.

Test image is in http://altserver01.iptime.org/release_by_fxn/swan_test_image/20210928_NoAudio_in_Passthrough/

(ALTech) Sangmin Choi

2021-09-29 09:54

developer   ~0008322

Hi, River,

I tested 50 times and there is no issue with test firmware.
I could reproduce this issue 3~5 times before.

I think this issue has fixed and if you have any expected side effect or want me to do other test, please let me know.

Thank you.

(SW) River Wong

2021-09-29 10:26

developer   ~0008323

Hi Sangmin,

Could you try the IPTV channel with audio codec AC3 and AAC in "external device" mode?
And also try some VOD movies since this modification is related to IPTV player.

(ALTech) Sangmin Choi

2021-09-29 12:22

developer   ~0008324

Hi, River,

It looks working well.

(SW) River Wong

2021-09-29 14:06

developer   ~0008325

Hi Sangmin,

Thanks. It looks like the patch is fine.
I committed two patches to Bitbucket fix this issue.

commit 1edba0b67c9c39cba415f7b5c89a5da1964c515d
Author: river wong <river.wong@fii-foxconn.com>
Date: Wed Sep 29 14:03:11 2021 +0800

    Fix sometimes no audio issue after waking up from standby in passthrough mode. [2/2]
    Retry fail ampsdk API to fix this issue.

commit 6ce4c40ba16e72717f3f89a47ed5d20d2fde23c1
Author: river wong <river.wong@fii-foxconn.com>
Date: Wed Sep 29 13:51:13 2021 +0800

    Fix sometimes no audio issue after waking up from standby in passthrough mode. [1/2]

    Apply patch from Synpatic:

    [PATCH] AMP:SND:Add checking for passthrough input port

    1. MMCEI-9614 - audio is muted after acitive
    2. Add port status checking for passthrough port setup for racing
    case between audiohal and native application
    3. Root Cause:
       a. As no protection before, Android non-tunnel and liveTV
    could get PT handle in same time. But when liveTV push audio data to
    sound service, it is found the peer handle do not have a valid push
    buffer handle, then data is returned directly. Not able to send to
    HDMI output module - AOUT.
       b. When Android non-tunnel PT handle is cleared after liveTV PT setup,
    it could reset HDMI/SPDIF format to PCM mode. Even data is push to AOUT,
    as format not matched, sink device cannot get audio out.
    4. It only happen in legacy SND design. New desgin has replace mixer by router,
    PT port reource has been linked to SoundSink Port index.

    Impact:libsndsrv.so, libampclient.so

(SW) River Wong

2021-09-29 14:06

developer   ~0008326

Issues fixed

(ALTech) Sangmin Choi

2021-10-01 09:48

developer   ~0008353

I checked one more time and this issue was not reproduced with 20211001 daily build.
Thank you for support.

Issue History

Date Modified Username Field Change
2021-09-07 09:15 (ALTech) Sangmin Choi New Issue
2021-09-07 09:15 (ALTech) Sangmin Choi Status new => assigned
2021-09-07 09:15 (ALTech) Sangmin Choi Assigned To => (SW) Jacky Chiang
2021-09-07 09:15 (ALTech) Sangmin Choi File Added: First Screen setting.pdf
2021-09-07 09:15 (ALTech) Sangmin Choi File Added: Audio output setting.pdf
2021-09-07 09:40 (ALTech) Sangmin Choi Note Added: 0008087
2021-09-07 09:40 (ALTech) Sangmin Choi Note Added: 0008088
2021-09-07 09:41 (ALTech) Sangmin Choi File Added: BFX-UA300_20210903-153900.zip
2021-09-07 09:41 (ALTech) Sangmin Choi Note Edited: 0008087
2021-09-07 10:13 (SW) River Wong Note Added: 0008091
2021-09-07 10:13 (SW) River Wong Note Edited: 0008091
2021-09-07 10:14 (SW) River Wong Note Edited: 0008091
2021-09-07 10:25 (ALTech) Sangmin Choi Note Added: 0008092
2021-09-07 10:28 (ALTech) Sangmin Choi Note Edited: 0008092
2021-09-07 10:37 (SW) River Wong Note Added: 0008093
2021-09-07 10:38 (SW) River Wong Note Edited: 0008093
2021-09-07 12:05 (ALTech) Sangmin Choi Note Added: 0008094
2021-09-07 14:22 (SW) River Wong Note Added: 0008095
2021-09-07 14:53 (ALTech) Sangmin Choi Note Added: 0008096
2021-09-07 18:47 (SW) River Wong Note Added: 0008103
2021-09-07 18:48 (SW) River Wong Note Edited: 0008103
2021-09-07 19:19 (ALTech) Sangmin Choi Note Added: 0008105
2021-09-08 11:03 (SW) River Wong Note Added: 0008111
2021-09-16 08:40 (SW) Jacky Chiang Assigned To (SW) Jacky Chiang => (SW) River Wong
2021-09-16 13:38 (SW) River Wong Note Added: 0008236
2021-09-16 14:17 (ALTech) Sangmin Choi Note Added: 0008238
2021-09-28 10:13 (ALTech) Wooshin Kang Note Added: 0008312
2021-09-28 13:56 (SW) River Wong Note Added: 0008317
2021-09-28 18:48 (SW) River Wong Note Added: 0008320
2021-09-29 09:54 (ALTech) Sangmin Choi Note Added: 0008322
2021-09-29 10:26 (SW) River Wong Note Added: 0008323
2021-09-29 12:22 (ALTech) Sangmin Choi Note Added: 0008324
2021-09-29 14:06 (SW) River Wong Note Added: 0008325
2021-09-29 14:06 (SW) River Wong Assigned To (SW) River Wong => (ALTech) Sangmin Choi
2021-09-29 14:06 (SW) River Wong Status assigned => resolved
2021-09-29 14:06 (SW) River Wong Resolution open => fixed
2021-09-29 14:06 (SW) River Wong Note Added: 0008326
2021-10-01 09:48 (ALTech) Sangmin Choi Status resolved => closed
2021-10-01 09:48 (ALTech) Sangmin Choi Note Added: 0008353